The present disclosure relates to techniques of encoding moving images, and more particularly, to encoding techniques which are used when moving images are captured at a high resolution and a low bit rate. These techniques are used in products, such as network cameras, in-vehicle cameras, digital camcorders, etc.
In recent years, the resolution of the network camera has been increased. Despite the increase in resolution, the network camera still requires as low a target bit rate as it was before. Therefore, the number of bits allocated for encoding per frame remains as low as it was before in spite of the high resolution, disadvantageously resulting in a degradation in image quality.
In a conventional encoder, the frame rate is reduced based on a simple frame skipping algorithm in order to obtain a target bit rate. However, when the simple frame skipping is employed, decoded images are significantly unnatural in terms of visual quality.
There is a known technique of reducing or preventing the degradation in visual quality in which a difference between a frame image to be encoded and an image to be referenced during encoding, which is calculated on a pixel-by-pixel basis, and a frame which is determined to have a small difference is skipped. It is defined that “a pixel difference is small=a motion is small.” Only frames having a small motion are skipped, whereby the number of bits allocated for encoding per frame is increased while unnaturalness in images is reduced (see Japanese Patent Publication No. 2008-236789).
When the pixel difference between the input frame and the reference frame is used to determine whether or not frame skipping is to be performed as described above, a small motion may cause a large pixel difference. In this case, frame skipping is not performed on frames having a small motion, and therefore, the number of bits allocated for encoding per frame decreases, resulting in a degradation in image quality. In particular, the tendency of this situation is significant if the input image contains a large amount of high-frequency components.
For moving images, the amount of a movement from the reference frame and the difference value of the remainder are encoded. Therefore, the pixel difference amount is not necessarily proportional to a code size after encoding. Therefore, even for a frame for which the number of bits allocated for encoding is small, if the pixel difference is large, it is determined that the frame is to be skipped, resulting in an unnatural image. In particular, the tendency of this situation is significant if the input image contains a large amount of high-frequency components.
In addition, the same algorithm is applied to any scenes to determine whether or not a frame is to be skipped, and therefore, the frame skipping process may not be suitable for some scenes.
If the above algorithm is used, frame skipping is applied only to scenes having a small motion. A scene having a large motion has a lower compression efficiency than that of a scene having a small motion, but has the same number of bits allocated for encoding per frame, and therefore, the degradation in image quality is not reduced.